// 解题思路：
// 选取三条边，检查能否拼成三角形，再检查剩下的三条边能否拼成三角形
// 选取三条边可以采用 dfs 的方式

import java.util.*;
import java.io.*;

public class TwoTriangle {
    public static Read in = new Read();
    public boolean[] check = new boolean[6];
    public int num = 0;
    public long[] side = new long[3];
    public static void main(String[] args) throws IOException{
        int t = in.nextInt();
        int index = 0;
        while(index < t){
            TwoTriangle s = new TwoTriangle();
            int[] nums = new int[6];

            for(int j = 0; j < 6; j++){
                nums[j] = in.nextInt();
            }
            Arrays.sort(nums);
            boolean flag = false;
            for(int i = 0; i < 6; i++){
                if(s.dfs(nums, i)) {
                    flag = true;
                    break;
                }
            }
            if(flag) System.out.println("Yes");
            else System.out.println("No");

            index++;
        }
    }

    public boolean dfs(int[] nums, int pos){
        if(num == 3){
            if(side[0] + side[1] > side[2] && checkTriangle(nums)) return true;
            else return false;
        }
        for(int i = pos; i < 6; i++){
            if(check[i] == false){
                check[i] = true;
                side[num] = nums[i];
                num++;
                if(dfs(nums, i + 1)){
                    return true;
                }
                check[i] = false;
                num--;
                side[num] = 0;
            }
        }
        return false;
    }

    public boolean checkTriangle(int[] nums){
        int count = 0;
        long[] side = new long[3];
        for(int i = 0; i < 6; i++){
            if(check[i] == false){
                side[count] = nums[i];
                count++;
            }
        }
        if(side[0] + side[1] > side[2]) return true;
        return false;
    }
}

class Read{
    BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer st = new StringTokenizer("");

    String next() throws IOException{
        while(!st.hasMoreTokens()){
            st = new StringTokenizer(bf.readLine());
        }
        return st.nextToken();
    }

    int nextInt() throws IOException{
        return Integer.parseInt(next());
    }
}
